package com.platform.service.impl;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.platform.annotation.Authentication;
import com.platform.base.BaseServiceImpl;
import com.platform.base.mvc.IBaseMapper;
import com.platform.dao.SysLogApiDAO;
import com.platform.dto.SysLogApiDTO;
import com.platform.logger.model.ApiLogModel;
import com.platform.logger.service.IApiLogService;
import com.platform.service.SysLogApiService;

/**
 * 接口请求日志; InnoDB free: 368640 kB
 * 
 * @author platform
 * @email 15909910367@163.com
 * @date 2022-10-28 17:37:15
 */
@Service("sysLogApiService")
public class SysLogApiServiceImpl extends BaseServiceImpl<SysLogApiDTO> implements SysLogApiService,IApiLogService {
	@Autowired
	private SysLogApiDAO sysLogApiDAO;

	@Override
	public IBaseMapper<SysLogApiDTO> getMapper() {
		return sysLogApiDAO;
	}

	@Override
	@Authentication
	public void saveApiLog(ApiLogModel apiLog) {
		SysLogApiDTO dto = new SysLogApiDTO();
		BeanUtils.copyProperties(apiLog, dto);
		sysLogApiDAO.insert(dto);
	}
}
